import { App } from 'vue';
import { createRouter, createMemoryHistory } from 'vue-router';
import { basicRoutes } from './routers';
import { scrollBehavior } from './scrollBehavior';
import { createGuard } from './guard/index';
const router = createRouter({
  history: createMemoryHistory(),
  routes: basicRoutes,
  strict: true,
  scrollBehavior: scrollBehavior,
});

export function setupRouter(app: App) {
  app.use(router);
  createGuard(router);
}

export default router;
